define(["core/boilerplate", "core/manager", "core/particle", "particle"], function(Boilerplate, Manager, ParticleEngine) {
	var ParticleManager = new ParticleEngine();

	ParticleManager.init = function() {
		
	};

	ParticleManager._update = ParticleManager.update;

	ParticleManager.update = function() {
		for(var i = 0, c = 100; i < c; i++) {
			ParticleManager.add({
				position: {
					x : Boilerplate.scene.width/2,
					y : Boilerplate.scene.height/2
				},
				size : {
					x : 2,
					y : 2
				},
				speed : {
					x : rand(-5, 5),
					y : rand(-5, 5)
				},
				time 	: rand(50, 100), 
				color 	: "rgba(0, 255, 0, 1)",
				destroy : function() {
					this.time += 10;
					this.color = "rgba(255, 0, 0, 1)";
				}
			});
		}

		ParticleManager._update();
	};

	return ParticleManager;
});